#ifndef _CAMERA_H_
#define _CAMERA_H_

#include "JPVec2.h"
#include "JPVec3.h"
#include "defines.h"

class Camera 
{
public:
	Camera();

	//------------------------------------------------
	// Public API
	//------------------------------------------------

	void update(const JPVec2 &mouseDir);

	void setPosition(const JPVec3 &position)	{ m_position = position; }
	void setLookAt(const JPVec3 &lookat)		{ m_lookat = lookat; }
	void setMode(bool mode);

	void moveForward(float speed);
	void strafeCam(float speed); 
	void changezoom(float zoom);

	const JPVec3	&position() const	{return m_position;}
	const JPVec3	&lookat() const		{return m_lookat;} 
	const JPVec3	&up() const			{return m_up;}
	bool			getMode() const		{return m_mode;}
		
private:

	//------------------------------------------------
	// Private API
	//------------------------------------------------
	void rotateCamera3(float angle, const JPVec3 &axis);
	void rotateCameraFP(float angle, const JPVec3 &axis); 

	JPVec3 m_position;
	JPVec3 m_lookat;
	JPVec3 m_up;

	bool m_mode;
};

#endif //_CAMERA_H_